- /* siorem.cpp by K.Tsuru */
- // function ID = 406 BRADIX
- /********************
- SInteger class
- It returns a remainder m%n.
- [Notice]
- Using the relations
- m=n*q+r (q = m/n)
- r = m-n*q
- i.e.
- m%n = m - n*(m/n)
- can be evaluated.
- *********************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- // cannot inline function
- SInteger operator%(const SInteger& m, const SInteger& n){
- Ldiv_t r; //The type of "r" is INTGER(DRADIX).
- IIDiv(m, n, r, 1); //The type of "r" becomes BIN_INT.
- return r.rem;
- }
siorem.cpp : last modifiled at 2016/04/26 14:49:53(533 bytes)
created at 2016/04/25 14:53:17
The creation time of this html file is 2017/10/25 11:09:45 (Wed Oct 25 11:09:45 2017).